#ifndef __COMPONENT_BLOCK_ENTITY_H__
#define __COMPONENT_BLOCK_ENTITY_H__

#include "Component.hpp"
#include "Engine/Point3.hpp"
#include "Game/IInventory.hpp"


using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    // 所有方块实体都有这个组件，用于记录位置的
    
    struct ComponentBlockEntity : public Component
    {
        Point3 coordinates;
        IInventory *inventory = nullptr;

        virtual const std::string &getName() const override;
        static const std::string &GetName();
        virtual void load(const nlohmann::json &jsonData) override;
        virtual void save(nlohmann::json &jsonData) override;
        virtual void saveToMsgJson(nlohmann::json &jsonData) override;
    };

} // namespace PocketSurvival

#endif